DISCUSSION
The
ATSUGetAllFontFeatures function obtains an array of the feature type and selector pairs corresponding to all previously set font features in a style object. You can use the value passed back in the
oActualFeatureCount parameter to calculate the maximum font feature index to pass in the iFeatureIndex parameter of the function
ATSUGetFontFeature.
The best way to use
ATSUGetAllFontFeatures is to call it twice:
-
Pass a reference to the style object containing the font feature in the iStyle parameter, NULL for the oFeatureType and oFeatureSelector parameters, and 0 for the other parameters. ATSUGetAllFontFeatures returns the sizes of the feature type and selector arrays in the oActualFeatureCount parameter.
-
Allocate enough space for an array of the returned size, then call the function again, passing a pointer in the oFeatureType and oFeatureSelector parameters; on return, the pointers references arrays of feature types and selectors, respectively.